package cn.luoyifan.hrm.client;

import cn.luoyifan.hrm.domain.Login;
import cn.luoyifan.hrm.dto.LoginMealDto;
import cn.luoyifan.hrm.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

//用来调用认证中心
@FeignClient(value = " service-auth",fallbackFactory = LoginFeignClientFallbackFactory.class )
@RequestMapping("/login")
public interface LoginFeignClient {

    //保存一个login
    @RequestMapping(value="/save",method= RequestMethod.POST)
    AjaxResult save(@RequestBody Login login);

    //保存一个login和套餐
    @RequestMapping(value="/saveLoginAndMeal",method= RequestMethod.POST)
    AjaxResult saveLoginAndMeal(@RequestBody LoginMealDto loginMealDto);

}
